package com.wang.ssm.mapper;

import com.wang.ssm.pojo.vo.StudentVo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
* @author Lenovo
* @description 针对表【student】的数据库操作Mapper
* @createDate 2023-10-18 11:34:29
* @Entity com.wang.ssm.pojo.Student
*/
@Mapper
public interface StudentMapper {

    List<StudentVo> findAll(String sname);

    @Insert("insert into student(sname,sex,rid) values(#{sname},#{sex},#{rid}) ")
    int add(StudentVo student);

    @Update("update student set sname=#{sname},sex=#{sex},rid=#{rid} where sid=#{sid}")
    int update(StudentVo student);
}
